import httpRequest from "@/http"
import { MyResponseType } from "@/bean/base/response";
import { MyPageResponseType } from "@/bean/base/page";
import { MenuGroupType } from "@/bean/menu/AllMenuType";

export const getMenuGroupTreeListApi = (params:Object) => {
    return httpRequest.post<MyResponseType<MyPageResponseType<MenuGroupType>>>("/comMenuGroup/getTreeList",params);
}



export const getMenuGroupListApi = (params:Object) => {
    return httpRequest.post("/comMenuGroup/list",params);
}


export const addMenuGroupApi = (params:Object) => {
    return httpRequest.post<MyResponseType<object>>("/comMenuGroup/add",params);
}


export const updateMenuGroupApi = (params:Object) => {
    return httpRequest.post<MyResponseType<object>>("/comMenuGroup/update",params);
}

export const delMenuGroupApi = (params:Number) => {
    return httpRequest.post<MyResponseType<Object>>(`/comMenuGroup/delete?id=${params}`,null);
}
